Selective Caching of Servable Files Based at Least in Part on a Type of Memory

ABSTRACT

Methods and apparatuses are provided for use in servers or other like devices that output content data based on requests. Activity and/or other like information, e.g., in the form of Metadata, is gathered/maintained for each handled request and used to determine if the corresponding content data should be cached in memory to speed up subsequent similar requests for the content data, or conversely removed from the memory cache. The activity and/or other like information can be considered in light of one or more activity or other useful parameters that define the operation of the resulting content data cache(s).

RELATED PATENT APPLICATIONS

This U.S. patent application is a continuation of, claims the benefit ofpriority from, and hereby incorporates by reference the entiredisclosure of, co-pending U.S. application for Letters patent Ser. No.10/378,522, filed Mar. 3, 2003, and titled “Selective Caching ofServable Files”, which itself claims the benefit of priority from, andhereby incorporates by reference the entire disclosure of, U.S.Provisional Application for Letters Patent Ser. No. 60/366,797, filedMar. 22, 2002, and titled “Activity Period of Optimization”.

BACKGROUND

The popularity of the Internet, and in particular, the portion of theInternet known as the World Wide Web, continues to grow. The World WideWeb is basically a collection of computers that are operatively linkedtogether through a plurality of communication networks. Typically, usersaccess the World Wide Web through a personal computer or like device,which is connected to the Internet via a modem of some type. Forexample, many users of the World Wide Web connect to the Internet usinga dial-up telephone networked modem configured to establish datacommunications through an Internet Services Provider (ISP). Other usersconnect to the Internet with a faster modem, e.g., a cable modem,digital subscriber line (DSL) modem, etc.

Regardless of how a user ultimately connects to the Internet/World WideWeb, once connected, the user typically accesses information availabletherein by using a web browser or like application. A web browser isconfigured to access web pages that are provided through the Internet byother computers. For example, one or more web server computers may beconnected to the Internet and configured with one or more web sites orother supporting web applications. A web site typically has one or morestatic web pages and/or is capable of supplying one or more dynamicallygenerated web pages that the user may selectively download, view andpossibly interact with.

To identify a particular web site/page, the user will typically select ahyper-link to the desired web site/page or may choose to manually entera unique name for the web site/page. The most common name used foridentifying a web site/page is known as the uniform resource locator(URL). By entering a URL, the user will be connected to an appropriateweb server which hosts the applicable web application(s), and therequested web page will be downloaded, in this case using a hypertexttransfer protocol (HTTP), to the web browser. Within the Internetitself, the selected URL is associated with a specific Internet Protocol(IP) address. This IP address takes the form of a unique numericalidentifier, which has been assigned to the targeted web server. Thus, auser may also directly enter an IP address in the web browser. However,the majority of users tend to favor the use of the more easilyremembered and entered URL.

When a typical web server receives a request, e.g., an HTTP request,from a web browser, it needs to handle the request. Hence, a web serverprocess may be configured to handle the request itself, or may need topass the request on to another process, e.g., a worker process, that isconfigured to handle the request.

Regardless as to how the request is handled, the result is that aresponse is generated. The response includes some type of content dataand is provided to the requesting client program/device. One example ofcontent data is a web page that is then processed and typicallydisplayed by a browser. It takes time and computational resources forthe web server to handle the request, and to generate or otherwiseoutput the appropriate content data. Typically, a web server handles aplurality of web pages associated with one or more web sites.

One common practice is to buffer content data in memory after it hasbeen generated. Consequently, when a subsequent request for the bufferedcontent data is received the content data need not be generated againbut rather served directly from memory to the client program/device.This usually reduces the response time and/or the processing load. Incertain conventional web servers, the buffering techniques includebuffering newly generated content data. Since there is only a finiteamount of memory available for buffering content data, there is usuallynot enough memory to hold all of the content data that a web site and/orweb server may need to output. As such, eventually some web content willneed to be generated fresh/again.

It would be beneficial to have improved techniques for managing thebuffered content data such that the web server's performance is furtherimproved.

SUMMARY

Methods and apparatuses are provided for use in servers or other likedevices that output content data based on requests. Activity and/orother like information is gathered/maintained for each handled requestand used to determine if the corresponding content data should be cachedin memory to speed up subsequent similar requests for the content data,or conversely not cached in memory. The activity and/or other likeinformation can be considered in light of one or more activityparameters or other useful parameters that essentially define theoperation of the resulting content data cache(s).

By way of example, the above stated needs and others are met by anapparatus for use in a server device. Here, the apparatus includes logicthat is operatively coupled to memory and configured to gatherinformation about at least one request for content data, and selectivelystore the content data in at least one content data cache in the memorybased on the gathered information.

The gathered information may include activity information associatedwith a defined period of time. The gathered information may includecontent data type information and/or content data size information.

The logic may be configured to selectively store the content data in theleast one content data cache based on at least one parameter. Here, forexample, the parameter may define a period of time associated with thegathered information, define at least one activity level thresholdvalue, define a content data type, and/or define at least one contentdata size threshold value.

In certain implementations, the logic can be configured to selectivelymodify at least one parameter. The logic may even dynamically modify atleast one parameter.

In other implementations, the logic can be configured to selectivelystore the content data in the at least one content data cache based on atype of the memory being used or available.

The logic can be configured to output the content data stored in atleast one content data cache.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete understanding of the various methods, apparatuses andsystems of the present invention may be had by reference to thefollowing detailed description when taken in conjunction with theaccompanying drawings wherein:

FIG. 1 is a block diagram that depicts an exemplary device, in the formof a computer, which is suitable for use with certain implementations ofthe present invention.

FIG. 2 is a block diagram depicting a selective content data cachingarrangement, in accordance with certain exemplary implementations of thepresent invention.

DESCRIPTION

FIG. 1 depicts a computing environment 120 that includes ageneral-purpose computing device in the form of a computer 130. Thecomponents of computer 130 may include one or more processors orprocessing units 132, a system memory 134, and a bus 136 that couplesvarious system components including system memory 134 to processor 132.

Bus 136 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnects (PCI) bus also known as Mezzaninebus.

Computer 130 typically includes a variety of computer readable media.Such media may be any available media that is accessible by computer130, and it includes both volatile and non-volatile media, removable andnon-removable media.

In FIG. 1, system memory 134 includes computer readable media in theform of volatile memory, such as random access memory (RAM) 140, and/ornon-volatile memory, such as read only memory (ROM) 138. A basicinput/output system (BIOS) 142, containing the basic routines that helpto transfer information between elements within computer 130, such asduring start-up, is stored in ROM 138. RAM 140 typically contains dataand/or program modules that are immediately accessible to and/orpresently being operated on by processor 132.

Computer 130 may further include other removable/non-removable,volatile/non-volatile computer storage media. For example, FIG. 1illustrates a hard disk drive 144 for reading from and writing to anon-removable, non-volatile magnetic media (not shown and typicallycalled a “hard drive”), a magnetic disk drive 146 for reading from andwriting to a removable, non-volatile magnetic disk 148 (e.g., a “floppydisk”), and an optical disk drive 150 for reading from or writing to aremovable, non-volatile optical disk 152 such as a CD-ROM/R/RW,DVD-ROM/R/RW/+R/RAM or other optical media. Hard disk drive 144,magnetic disk drive 146 and optical disk drive 150 are each connected tobus 136 by one or more interfaces 154.

The drives and associated computer-readable media provide nonvolatilestorage of computer readable instructions, data structures, programmodules, and other data for computer 130. Although the exemplaryenvironment described herein employs a hard disk, a removable magneticdisk 148 and a removable optical disk 152, it should be appreciated bythose skilled in the art that other types of computer readable mediawhich can store data that is accessible by a computer, such as magneticcassettes, flash memory cards, digital video disks, random accessmemories (RAMs), read only memories (ROM), and the like, may also beused in the exemplary operating environment.

A number of program modules may be stored on the hard disk, magneticdisk 148, optical disk 152, ROM 138, or RAM 140, including, e.g., anoperating system 158, one or more application programs 160, otherprogram modules 162, and program data 164.

The improved methods and systems described herein may be implementedwithin operating system 158, one or more application programs 160, otherprogram modules 162, and/or program data 164.

A user may provide commands and information into computer 130 throughinput devices such as keyboard 166 and pointing device 168 (such as a“mouse”). Other input devices (not shown) may include a microphone,joystick, game pad, satellite dish, serial port, scanner, camera, etc.These and other input devices are connected to the processing unit 132through a user input interface 170 that is coupled to bus 136, but maybe connected by other interface and bus structures, such as a parallelport, game port, or a universal serial bus (USB).

A monitor 172 or other type of display device is also connected to bus136 via an interface, such as a video adapter 174. In addition tomonitor 172, personal computers typically include other peripheraloutput devices (not shown), such as speakers and printers, which may beconnected through output peripheral interface 175.

Computer 130 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer182. Remote computer 182 may include many or all of the elements andfeatures described herein relative to computer 130.

Logical connections shown in FIG. 1 are a local area network (LAN) 177and a general wide area network (WAN) 179. Such networking environmentsare commonplace in offices, enterprise-wide computer networks,intranets, and the Internet.

When used in a LAN networking environment, computer 130 is connected toLAN 177 via network interface or adapter 186. When used in a WANnetworking environment, the computer typically includes a modem 178 orother means for establishing communications over WAN 179. Modem 178,which may be internal or external, may be connected to system bus 136via the user input interface 170 or other appropriate mechanism.

Depicted in FIG. 1, is a specific implementation of a WAN via theInternet. Here, computer 130 employs modem 178 to establishcommunications with at least one remote computer 182 via the Internet180.

In a networked environment, program modules depicted relative tocomputer 130, or portions thereof, may be stored in a remote memorystorage device. Thus, e.g., as depicted in FIG. 1, remote applicationprograms 189 may reside on a memory device of remote computer 182. Itwill be appreciated that the network connections shown and described areexemplary and other means of establishing a communications link betweenthe computers may be used.

Attention is now drawn to FIG. 2, which is a block diagram illustratingan exemplary client-server arrangement 200 that includes a selectivecontent caching capability in accordance with certain implementations ofthe present invention. While the following description includes anexemplary web server such as might be found on the Internet, anintranet, etc., it should be understood that other non-web basedclient-server arrangements and other like configurations can alsobenefit from the improved methods and apparatuses provided herein.

With this in mind, client server arrangement 200 includes client logic202 which is configured to provide a content data request 204 to serverlogic 206. Here, for example, content data request 204 may include a webpage request that is sent over a network from a client computer to oneor more server devices.

Let this be the first time that content data request 204 has beenreceived by server logic 206. This means that the requested content datais not readily available in a content data cache, at least not yet. Assuch, server logic 206 needs to generate a corresponding content dataresponse. To accomplish this task, sever logic 206 includes content datagenerating logic 208 which is configured to generate content dataresponse 212, which is provided by server logic 206 to client logic 202.

Content data generating logic 208, in this example, accesses one or morefiles 210. Here, file 210 may be stored on a hard drive or other likestorage mechanism(s). File 210 may include static data, script data,dynamic data, etc. Content data generating logic 208 processes thisdata, as/if needed, to produce content data that is included in contentdata response 212.

Server logic 206 also includes caching logic 214. Within caching logic214 there is an activity monitor 216. As illustrated by the solid-linedarrows, server logic 206 is configured to access memory 218. Forexample, activity monitor 216 is configured to access activityinformation 220 and at least one activity parameter 222 stored withinmemory 218, and caching logic 214 is configured to access content data224 within at least one content data cache 226 in memory 218.

Returning to the exemplary request handing process started earlier, oncecontent data generating logic 208 has generated content data for contentdata response 212, activity monitor 216 modifies activity information220 to record that the particular content data was requested. In thismanner, activity information 220 begins to collect information regardingthe demand for the particular content data that was requested.

In accordance with certain implementations, for example, caching logic214 can be configured to determine whether a particular content data 224is to be stored in content data cache 226 based on one or more activityparameters 222 including the level of continuing and/or sustained demandfor the content data over a period of time.

At this point in this exemplary request handing process, it is assumedthat the content data generated for this initial request does notqualify for storage in content data cache 226.

Assume now that a subsequent content data request 204 is received byserver logic 206. Server logic 206, using caching logic 214, determinesif the content data for this subsequent request is available withincontent data cache 226. Here, the requested content data is not yet incontent data cache 226. As such, server logic 206 needs to generate thecontent data once again and server logic 206 needs to output contentdata response 212 as it did before. Activity monitor 216 will once againmodify activity information 220 to record this subsequent request forthe same content data.

Caching logic 214 along with activity monitor 216 will determine, basedon one or more activity parameters 222 and activity information 220, ifthe content data generated for the subsequent request should be storedin content data cache 226. There are a variety of decisional techniquesthat may be employed to determine when to add (or remove) content data224 to (from) content data cache 226. Several decisional techniques aredescribed in greater detail below. For now, in this example, assume thatcaching logic 214 and activity monitor 216 are configured to store thecontent data 224 in content data cache 226 because activity information220 shows that there have been enough requests for this particularcontent data within a specified period of time. Here, for example,activity parameters 222 may include a threshold demand storage valueand/or a threshold demand removal value that is used to determine iscontent data 224 is stored or removed, respectively, from content datacache 226. Activity parameters 222 may include information establishingthe period of time over which demand is measured. These and otheractivity parameters may be programmably set and in certainimplementations dynamically adjusted to further optimize or otherwisechange the operation of server logic 206 and/or memory 218.

In the above exemplary process, assume that receiving two requestswithin a period of ten seconds qualifies content data 224 to be storedin content data cache 226. Then assume that a third content data request204 is received. Now caching logic 214 will be able to quickly accesscontent data 224 from content data cache 226 and therefore server logic206 can output a corresponding content data response 212 withoutrequiring content data generating logic 208 to again generate suchcontent data.

Thus, as described above, activity monitor 216 and caching logic 214 canbe configured to store content data 224 having “high enough” demand incontent data cache 226, and also to remove/erase content data 224 fromcontent data cache 226 when demand is not high enough.

In this example, activity information 220 is modified for each requestthat is handled regardless as to whether the content data was generatedor read from content data cache 226. In the exemplary demand leveldecision process described above, activity information for any givenrequest for content data need only be stored in activity information 220for the defined period of time. Thus, for example, in certainimplementations, a unique identifier and timestamp can be recorded inactivity information 220 for a given request for content data. After thedefined period of time has passed within enough subsequent similarrequests, then the unique identifier and associated timestamp becomestale and can be removed/erased from activity information. What thisillustrates is that with the proper settings of activity parameters 222,the amount of memory required for activity information 220 can besignificantly controlled and also only a small amount of informationneed be recorded in activity information 220.

One of the benefits to this arrangement is that content data cache 226may be configured to only include content data 224 that is in highenough demand. This tends to make the server run more efficiently as itis not buffering content data that is seldom requested.

As mentioned, caching logic 214 in certain implementations is configuredto dynamically change one or more activity parameters 222 that are usedto determine what content data is added to, or removed from, contentdata cache 226 and when. This dynamic relationship is illustrated inFIG. 2 by the dashed-line arrow between caching logic 214 and activityparameters 222. Thus, for example, caching logic 214 may increase thedemand measuring period at times when fewer requests are being received,and/or decrease the demand measuring period at times when more requestsare being received to optimize use of the processing and/or memoryresources in the server. Similarly, the threshold demand levels can bedynamically adjusted to promote certain efficiencies.

The above examples are directed towards demand-based caching decisions.Arrangement 200, may also take into account still other decisionalinformation. Thus, for example, in certain implementations caching logic214 and/or activity monitor 216 can be configured to base cachingdecisions on other activity parameters 222 such as the type of contentdata. Here, some types of content data may be considered better cachingcandidates than other types of content data. For example, content datathat requires additional processing time may be a better cachingcandidate than content data that is easier to generate. In anotherexample, the size of the content data can be considered. Thus, forexample, in certain implementations it may prove beneficial to cachelarger sized content data, while in other implementations smaller sizedcontent data may be better caching candidates.

In still other implementations, caching logic 214 and/or activitymonitor 216 also consider the type(s) of memory 218 that content datacache 226 is stored in. Thus, for example, content data cache 226 mayextend across different memory structures and certain content data 224may be better off if stored in particular memory locations.

In one example, content data cache(s) may include both user-mode andkernel-mode memory, and content data 224 that is in very high demand maybe stored in kernel-mode memory for even quicker handling. Similarly,certain types or sizes of content data may be better stored in eitherkernel-mode or user-mode memory.

In other implementations, the memory includes different levels (e.g.,L1, L2, etc,) memory based on the hardware structure of the serverdevice. Here, again, certain high-demand, low-demand, types, and/orsizes of content data may be better stored in content data cache withincertain memory levels.

Although some preferred implementations of the various methods andapparatuses of the present invention have been illustrated in theaccompanying Drawings and described in the foregoing DetailedDescription, it will be understood that the invention is not limited tothe exemplary embodiments disclosed, but is capable of numerousrearrangements, modifications and substitutions without departing fromthe spirit of the invention.

1. An apparatus for use in a server device having memory, the apparatuscomprising: logic operatively coupled to said memory and configured togather information about at least one request for content data, andselectively store said content data in at least one content data cachein said memory based on said gathered information, wherein said logic isconfigured to selectively store said content data in said at least onecontent data cache by determining a type of said memory in said serverdevice.
 2. The apparatus as recited in claim 1, wherein said gatheredinformation includes activity information.
 3. The apparatus as recitedin claim 2, wherein said activity information is associated with adefined period of time.
 4. The apparatus as recited in claim 1, whereinsaid gathered information includes content data type information.
 5. Theapparatus as recited in claim 1, wherein said gathered informationincludes content data size information.
 6. A method for use in a serverdevice, the method comprising: determining content data; gatheringinformation about at least one request for said content data; andselectively storing said content data in at least one content data cachein memory based on said gathered information, wherein selectivelystoring said content data in said at least one content data cache isbased at least in part on a type of said memory.
 7. The method asrecited in claim 6, where said memory in said server device includesvarying levels for selectively storing content data with varying levelsof demand.
 8. A computer-readable medium having computer implementableinstructions for configuring at least one processing unit in a serverdevice, to perform acts comprising: determining content data; gatheringinformation about at least one request for said content data; andselectively storing said content data in at least one content data cachein memory based on said gathered information, wherein selectivelystoring said content data in said at least one content data cache isbased at least in part on a type of said memory.
 9. Thecomputer-readable medium as recited in claim 8, wherein said gatheredinformation includes activity information.
 10. The computer-readablemedium as recited in claim 9, wherein said activity information isassociated with a defined period of time.
 11. The computer-readablemedium as recited in claim 8, wherein said gathered information includescontent data type information.
 12. The computer-readable medium asrecited in claim 8, wherein said gathered information includes contentdata size information.
 13. The computer-readable medium as recited inclaim 8, further comprising: selectively storing said content data insaid at least one content data cache based at least in part on at leastone parameter.
 14. The computer-readable medium as recited in claim 13,wherein said at least one parameter defines a period of time associatedwith said gathered information.
 15. The computer-readable medium asrecited in claim 13, wherein said at least one parameter defines anactivity level threshold value.
 16. The computer-readable medium asrecited in claim 13, wherein said at least one parameter defines acontent data type.
 17. The computer-readable medium as recited in claim13, wherein said at least one parameter defines a content data sizethreshold value.
 18. The computer-readable medium as recited in claim13, further comprising: selectively or dynamically modifying said atleast one parameter.
 20. The computer-readable medium as recited inclaim 8, further comprising: outputting said content data stored in saidat least one content data cache.